Skip to content

Conversation

@andrewsomething
Copy link

No description provided.

push:
branches:
- main
paths:
Copy link
Author

@andrewsomething andrewsomething Dec 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is used to make the action trigger only on changes to certain files. It's not required. In my example repo, I did it mainly to keep it from deploying on changes to the README. You can remove it completely like this or update it to include the things required for the python app (e.g. server.py).

https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpaths

- name: Checkout master
uses: actions/checkout@main

- name: Update SHA
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is failing as it the directory does not exist. It is part of the static site example and not needed for the python app.

https://github.com/sharmita3/sample-python/runs/1481140544?check_suite_focus=true#step:3:4

kind: Service
metadata:
name: python-example-service
annotations:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These annotations are used to manage DNS using external-dns and set up SSL. It's not strictly required for a push to deploy example and would require additional prerequisites.

https://www.digitalocean.com/docs/kubernetes/how-to/configure-load-balancers/#ssl-certificates
https://blog.andrewsomething.com/2019/04/04/external-dns-with-ssl-on-k8s/

port: 443
targetPort: 5000
port: 80
targetPort: 80
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This app listens on port 80, so we need to update the targetPort.

https://github.com/sharmita3/sample-python/blob/main/server.py#L16

Since we removed the SSL configuration above, we need to change the port to 80 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant